﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace CartoGraphic.Model
{
    class PointGeo:AbstractGeometry,IDrawItem
    {
        public MyPoint centerPoint;
        public int radius=5;
        //public Icon icon;
        //public string type;
        public override void Draw(Graphics g)
        {
            base.Draw(g);
            if (type.Equals("B"))
                drawB(g);
            else if (type.Equals("C"))
                drawC(g);
            else if (type.Equals("F"))
                drawF(g);
            else if (type.Equals("H"))
                drawH(g);
            else if (type.Equals("R"))
                drawR(g);
            else if (type.Equals("T"))
                drawT(g);
            else if (type.Equals("V"))
                drawV(g);
        }

        public void drawB(Graphics g)
        {
            
            this.pen.Color = Color.Black;
            this.brush=new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawC(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawF(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawH(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawR(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawT(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawV(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public void drawU(Graphics g)
        {
            this.pen.Color = Color.Black;
            this.brush = new SolidBrush(Color.Black);
            g.FillEllipse(this.brush, this.centerPoint.sX, this.centerPoint.sY, (int)this.radius, (int)this.radius);
        }

        public PointGeo(MyPoint point, string type)
        {
            this.dimention = 0;
            this.centerPoint = point;
            this.type = type;
            //icon = new Icon("logo.bmp");
        }
    }
}
